package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PaymentMethodSettingsMapper;
import com.ruoyi.system.domain.PaymentMethodSettings;
import com.ruoyi.system.service.IPaymentMethodSettingsService;

/**
 * 收款方式设置Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-12
 */
@Service
public class PaymentMethodSettingsServiceImpl implements IPaymentMethodSettingsService
{
    @Autowired
    private PaymentMethodSettingsMapper paymentMethodSettingsMapper;

    /**
     * 通过id查询收款方式设置
     *
     * @param id 收款方式设置主键
     * @return 收款方式设置
     */
    @Override
    public PaymentMethodSettings selectPaymentMethodSettingsById(Long id)
    {
        return paymentMethodSettingsMapper.selectPaymentMethodSettingsById(id);
    }

    /**
     * 查询收款方式设置列表
     *
     * @param storeName 门店名称
     * @return 收款方式设置
     */
    @Override
    public List<PaymentMethodSettings> selectPaymentMethodSettingsListByName(String storeName)
    {
        return paymentMethodSettingsMapper.selectPaymentMethodSettingsListByName(storeName);
    }

    /**
     * 新增收款方式设置列表
     *
     * @param paymentMethodSettings 收款方式设置
     * @return 结果
     */
    @Override
    public int insertPaymentMethodSettings(PaymentMethodSettings paymentMethodSettings)
    {
        return paymentMethodSettingsMapper.insertPaymentMethodSettings(paymentMethodSettings);
    }

    /**
     * 修改收款方式设置列表
     *
     * @param paymentMethodSettings 收款方式设置
     * @return 结果
     */
    @Override
    public int updatePaymentMethodSettings(PaymentMethodSettings paymentMethodSettings)
    {
        return paymentMethodSettingsMapper.updatePaymentMethodSettings(paymentMethodSettings);
    }

    /**
     * 批量删除收款方式设置列表
     *
     * @param ids 需要删除的收款方式设置主键
     * @return 结果
     */
    @Override
    public int deletePaymentMethodSettingsByIds(Long[] ids)
    {
        return paymentMethodSettingsMapper.deletePaymentMethodSettingsByIds(ids);
    }

    /**
     * 删除收款方式设置信息列表
     *
     * @param id 收款方式设置主键
     * @return 结果
     */
    @Override
    public int deletePaymentMethodSettingsById(Long id)
    {
        return paymentMethodSettingsMapper.deletePaymentMethodSettingsById(id);
    }
}
